<template>
  <div class="list-operation">
    <el-link v-if="showBind" size="mini" type="primary" style="margin-left:0px;" @click="parent.toBind(phase)">
      <span style="font-size: 12px;">绑定</span>
    </el-link>
    <!-- <el-link v-if="showEdit" size="mini" type="primary" style="margin-left:0px;" @click="parent.toEdit(phase)">
      <span style="font-size: 12px;">修改</span>
    </el-link> -->
    <el-link v-if="showRelieve" size="mini" type="primary" style="margin-left:0px;" @click="parent.toRelieveBind(phase)">
      <span style="font-size: 12px;">解绑</span>
    </el-link>
  </div>
</template>
<script>
export default {
  props: {
    parent: {
      type: Object,
      default: null
    },
    phase: {
      type: Object,
      default: null
    }
  },
  computed: {
    showBind: function() {
      return this.phase.mappingStatus === 0 || this.phase.mappingFlag === '0'
    },
    // showEdit: function() {
    //   return true
    // },
    showRelieve: function() {
      return this.phase.mappingStatus === 1 || this.phase.mappingFlag === '1'
    }
  }
}
</script>
<style scoped>
  .list-operation >>> .el-divider--vertical {
    margin: 0 2px
  }
</style>
